﻿
namespace bookMaster.AssetSystem.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.Libros"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class LibrosEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the IdLibro property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIdLibro;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IdLibro property.
		/// </summary>
		protected System.Windows.Forms.Label uxIdLibroLabel;
		
		/// <summary>
		/// TextBox for the IsbnLibro property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIsbnLibro;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IsbnLibro property.
		/// </summary>
		protected System.Windows.Forms.Label uxIsbnLibroLabel;
		
		/// <summary>
		/// TextBox for the NombreLibro property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxNombreLibro;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the NombreLibro property.
		/// </summary>
		protected System.Windows.Forms.Label uxNombreLibroLabel;
		
		/// <summary>
		/// TextBox for the CantidadExistenciaLibro property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxCantidadExistenciaLibro;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the CantidadExistenciaLibro property.
		/// </summary>
		protected System.Windows.Forms.Label uxCantidadExistenciaLibroLabel;
		
		/// <summary>
		/// TextBox for the CantidadEntranteLibro property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxCantidadEntranteLibro;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the CantidadEntranteLibro property.
		/// </summary>
		protected System.Windows.Forms.Label uxCantidadEntranteLibroLabel;
		#endregion
		
		#region Main entity
		private Entities.Libros _Libros;
		/// <summary>
		/// Gets or sets the <see cref="Entities.Libros"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.Libros"/> instance.</value>
		public Entities.Libros Libros
		{
			get {return this._Libros;}
			set
			{
				this._Libros = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxIdLibro.DataBindings.Clear();
			this.uxIdLibro.DataBindings.Add("Text", this.uxBindingSource, "IdLibro", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxIsbnLibro.DataBindings.Clear();
			this.uxIsbnLibro.DataBindings.Add("Text", this.uxBindingSource, "IsbnLibro", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxNombreLibro.DataBindings.Clear();
			this.uxNombreLibro.DataBindings.Add("Text", this.uxBindingSource, "NombreLibro", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxCantidadExistenciaLibro.DataBindings.Clear();
			this.uxCantidadExistenciaLibro.DataBindings.Add("Text", this.uxBindingSource, "CantidadExistenciaLibro", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxCantidadEntranteLibro.DataBindings.Clear();
			this.uxCantidadEntranteLibro.DataBindings.Add("Text", this.uxBindingSource, "CantidadEntranteLibro", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="LibrosEditControlBase"/> class.
		/// </summary>
		public LibrosEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_Libros != null) _Libros.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxIdLibro = new System.Windows.Forms.TextBox();
			uxIdLibroLabel = new System.Windows.Forms.Label();
			this.uxIsbnLibro = new System.Windows.Forms.TextBox();
			uxIsbnLibroLabel = new System.Windows.Forms.Label();
			this.uxNombreLibro = new System.Windows.Forms.TextBox();
			uxNombreLibroLabel = new System.Windows.Forms.Label();
			this.uxCantidadExistenciaLibro = new System.Windows.Forms.TextBox();
			uxCantidadExistenciaLibroLabel = new System.Windows.Forms.Label();
			this.uxCantidadEntranteLibro = new System.Windows.Forms.TextBox();
			uxCantidadEntranteLibroLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIdLibroLabel
			//
			this.uxIdLibroLabel.Name = "uxIdLibroLabel";
			this.uxIdLibroLabel.Text = "Id Libro:";
			this.uxIdLibroLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIdLibroLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdLibroLabel);			
			//
			// uxIdLibro
			//
			this.uxIdLibro.Name = "uxIdLibro";
			this.uxIdLibro.ReadOnly = true;
			//this.uxTableLayoutPanel.Controls.Add(this.uxIdLibro);
			this.uxIdLibro.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxIdLibro);
			//
			// uxIsbnLibroLabel
			//
			this.uxIsbnLibroLabel.Name = "uxIsbnLibroLabel";
			this.uxIsbnLibroLabel.Text = "Isbn Libro:";
			this.uxIsbnLibroLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxIsbnLibroLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIsbnLibroLabel);			
			//
			// uxIsbnLibro
			//
			this.uxIsbnLibro.Name = "uxIsbnLibro";
			this.uxIsbnLibro.Width = 250;
			this.uxIsbnLibro.MaxLength = 20;
			//this.uxTableLayoutPanel.Controls.Add(this.uxIsbnLibro);
			this.uxIsbnLibro.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxIsbnLibro);
			//
			// uxNombreLibroLabel
			//
			this.uxNombreLibroLabel.Name = "uxNombreLibroLabel";
			this.uxNombreLibroLabel.Text = "Nombre Libro:";
			this.uxNombreLibroLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxNombreLibroLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxNombreLibroLabel);			
			//
			// uxNombreLibro
			//
			this.uxNombreLibro.Name = "uxNombreLibro";
			this.uxNombreLibro.Width = 250;
			this.uxNombreLibro.MaxLength = 150;
			//this.uxTableLayoutPanel.Controls.Add(this.uxNombreLibro);
			this.uxNombreLibro.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxNombreLibro);
			//
			// uxCantidadExistenciaLibroLabel
			//
			this.uxCantidadExistenciaLibroLabel.Name = "uxCantidadExistenciaLibroLabel";
			this.uxCantidadExistenciaLibroLabel.Text = "Cantidad Existencia Libro:";
			this.uxCantidadExistenciaLibroLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxCantidadExistenciaLibroLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxCantidadExistenciaLibroLabel);			
			//
			// uxCantidadExistenciaLibro
			//
			this.uxCantidadExistenciaLibro.Name = "uxCantidadExistenciaLibro";
			//this.uxTableLayoutPanel.Controls.Add(this.uxCantidadExistenciaLibro);
			this.uxCantidadExistenciaLibro.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxCantidadExistenciaLibro);
			//
			// uxCantidadEntranteLibroLabel
			//
			this.uxCantidadEntranteLibroLabel.Name = "uxCantidadEntranteLibroLabel";
			this.uxCantidadEntranteLibroLabel.Text = "Cantidad Entrante Libro:";
			this.uxCantidadEntranteLibroLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxCantidadEntranteLibroLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxCantidadEntranteLibroLabel);			
			//
			// uxCantidadEntranteLibro
			//
			this.uxCantidadEntranteLibro.Name = "uxCantidadEntranteLibro";
			//this.uxTableLayoutPanel.Controls.Add(this.uxCantidadEntranteLibro);
			this.uxCantidadEntranteLibro.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxCantidadEntranteLibro);
			// 
			// LibrosEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "LibrosEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
		
		#endregion
		
        #region Field visibility

        /// <summary>
        /// Indicates if the controls associated with the uxIdLibro property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxIdLibroVisible
        {
            get { return this.uxIdLibro.Visible; }
            set
            {
                this.uxIdLibroLabel.Visible = value;
                this.uxIdLibro.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxIdLibro property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxIdLibroEnabled
        {
            get { return this.uxIdLibro.Enabled; }
            set
            {
                this.uxIdLibro.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxIsbnLibro property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxIsbnLibroVisible
        {
            get { return this.uxIsbnLibro.Visible; }
            set
            {
                this.uxIsbnLibroLabel.Visible = value;
                this.uxIsbnLibro.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxIsbnLibro property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxIsbnLibroEnabled
        {
            get { return this.uxIsbnLibro.Enabled; }
            set
            {
                this.uxIsbnLibro.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxNombreLibro property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxNombreLibroVisible
        {
            get { return this.uxNombreLibro.Visible; }
            set
            {
                this.uxNombreLibroLabel.Visible = value;
                this.uxNombreLibro.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxNombreLibro property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxNombreLibroEnabled
        {
            get { return this.uxNombreLibro.Enabled; }
            set
            {
                this.uxNombreLibro.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxCantidadExistenciaLibro property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxCantidadExistenciaLibroVisible
        {
            get { return this.uxCantidadExistenciaLibro.Visible; }
            set
            {
                this.uxCantidadExistenciaLibroLabel.Visible = value;
                this.uxCantidadExistenciaLibro.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxCantidadExistenciaLibro property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxCantidadExistenciaLibroEnabled
        {
            get { return this.uxCantidadExistenciaLibro.Enabled; }
            set
            {
                this.uxCantidadExistenciaLibro.Enabled = value;
            }
        }
        /// <summary>
        /// Indicates if the controls associated with the uxCantidadEntranteLibro property should be visible.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Visible property for related controls.")]
        public bool uxCantidadEntranteLibroVisible
        {
            get { return this.uxCantidadEntranteLibro.Visible; }
            set
            {
                this.uxCantidadEntranteLibroLabel.Visible = value;
                this.uxCantidadEntranteLibro.Visible = value;
            }
        }

        /// <summary>
        /// Indicates if the controls associated with the uxCantidadEntranteLibro property should be enabled.
        /// </summary>
        [System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Set Enabled property for related controls.")]
        public bool uxCantidadEntranteLibroEnabled
        {
            get { return this.uxCantidadEntranteLibro.Enabled; }
            set
            {
                this.uxCantidadEntranteLibro.Enabled = value;
            }
        }

        #endregion

		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
